package cate.game.role.farm.island.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBIsland;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "迷失神庙中执行操作の请求(包括移动和格子交互)")
public class IslandActionReq implements MsgInput {
    @NoteField(value = "格子坐横标")
    public int x;

    @NoteField(value = "附加参数", detail = "选英雄、技能、商品的时候传一下序号,商品放弃购买/深渊挑战放弃的话传-1")
    public int param;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        cc.getRole().getFarm().island.action(x, param);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBIsland.ACTION_REQ;
    }
}
